package dk.flashnotes.fff.helpers.pageInspector {
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;		

	/**
	 * @author jk
	 */
	public class InspectorLabel extends Sprite {
		protected var _tfLabel : TextField;
		private var _sprMarker : Sprite;
		
		
		private var _nMarkerSR : Number=4;

		public function InspectorLabel() {
			setup();
		}
		
		private function setup() : void {
			_tfLabel = new TextField();
			addChild(_tfLabel);
			
			_tfLabel.autoSize = TextFieldAutoSize.LEFT;
			_tfLabel.border=false;
			_tfLabel.selectable=false;
			_tfLabel.defaultTextFormat = new TextFormat("Arial", 10);
			_tfLabel.htmlText="g";
			
			_tfLabel.x = _tfLabel.height;
			
			_sprMarker = new Sprite();
			addChild(_sprMarker);
			
		}
		
		public function set sText(oNewValue : String) : void { 
			_tfLabel.htmlText = oNewValue; 
		}

		public function setMarker(uintColor : uint) : void {
			
			_sprMarker.graphics.clear();
			_sprMarker.graphics.beginFill(uintColor);
			_sprMarker.graphics.drawCircle(_tfLabel.height / 2, _tfLabel.height / 2, _tfLabel.height/_nMarkerSR);
		}
	}
}
